<html>
	<meta charset="utf-8"/>
	<head>
		<title>ajaxTest</title>
		<script type="text/javascript" src="js/jquery-3.2.1.js"></script>
	</head>

	<body>
		<div></div>
		<script>
			var subtype = {};
			subtype.id = 1000;
			subtype.name = "test";
			subtype.description = "hello";
			$(function() {
				console.log(JSON.stringify(subtype));
				$.ajax({
					type: "post",
					url: "http://localhost:8080/type/updateSubtype",
					data:JSON.stringify(subtype),
					dataType:"json",
					contentType:"application/json;charset=utf-8",
					success: function(data){
						alert(data);
					}
				});
			});
		</script>
	</body>

</html>